
<div class="container">
	<div style="margin-top: 9%; background-color: #F6F6F6; padding: 10px;">
		<div style="background-color: #FFFFFF;">
				<?php if(!empty($categorias)){ ?>
				<div class="btn-group">
			      <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Categoria 
			      <span class="caret"></span></button>
			      <ul class="dropdown-menu" role="menu">
			      		<?php 		foreach ($categorias as $categoria){  ?>
			      	  <li><a href="?action=categoria&status=1&id=<?php echo $categoria["id"];?>"><?php echo $categoria["nome"]; ?></a></li>
			       <?php } ?>
			      </ul>
			    </div>
			   <?php  }?>
			   <br>
			<table id="tableId" class="table table-bordered table-striped  table-hover ">
				<thead>
					<tr>
						<th>Tarefa</th>
						<th>T&iacute;tulo</th>
						<th>Data</th>
						<th>Status</th>
						<th>*</th>
						
					</tr>
				</thead>
				<tbody>
					<?php  if(!empty($tarefas)){
							foreach ($tarefas as $tarefa){
								$status = $Tarefa->checkStatus($tarefa["lida"],$tarefa["concluida"]);
					?>
					<tr>
						<td><?php echo $tarefa["id"]; ?></td>
						<td><?php echo $tarefa["titulo"]; ?></td>
						<td><?php echo $tarefa["data"]; ?></td>
						<td class="<?php echo $status["cor"]; ?>"><?php echo $status["status"]; ?></td>
						<td> <a href="#"  class="btn btn-success btn-sm" id="concluido-<?php echo $tarefa["id"];?>" onclick="concluido('<?php echo $tarefa["id"];?>')" ><span class="glyphicon glyphicon-ok"></span> </a>  </td>
					</tr>
					<?php }//for   
					}//if?>
				</tbody>
			</table>
		</div>
	</div>
</div>